package user_info

import (
	"github.com/imroc/req"
	"permission/databases"
	"permission/vigo_loger"
	"time"
)

// 同时退出子系统
func LoginOutApi(gdsid string) {
	rows := databases.FindClient()
	if len(rows) > 0 {
		for _, val := range rows {
			if val.CallBackURL != "" {
				param := req.Param{
					"GDSID": gdsid,
				}
				req.SetTimeout(2 * time.Second)
				_, err := req.Get(val.CallBackURL, param)
				if err != nil {
					vigo_loger.AddGrayLog(err.Error())
				}
			}
		}
	}
}
